<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:bscomp="http://java.sun.com/jsf/composite/bscomp"
	template="/WEB-INF/templates/master.xhtml">
	<ui:define name="page">
		<div class="navbar navbar-inverse navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container">
					<a class=" brand" href="#"> Signup App Demo</a>
				</div>
			</div>
		</div>
		<div class="container-fluid">
			<h:form id="form">
				<div class="offset3 span6  form-horizontal">
					<fieldset>
						<legend>Login Form</legend>
						<div class="control-group">
							<ui:fragment
								rendered="#{facesContext.externalContext.requestParameterMap['error'] ne null}">
								<h:panelGroup layout="block" class="alert alert-error">Invalid username or password, please try again.</h:panelGroup>
							</ui:fragment>
						</div>

						<div class="control-group">
							<label for="j_username" class="control-label">Username:</label>
							<div class="controls">
								<h:inputText id="username" value="#{loginAction.username}" />
							</div>
						</div>
						<div class="control-group">
							<label for="j_password" class="control-label">Password:</label>
							<div class="controls">
								<h:inputSecret id="password" value="#{loginAction.password}" />
							</div>
						</div>
					</fieldset>
					<div class="form-actions">
						<h:commandButton id="loginButton" type="submit" value="Login"
							class="btn btn-primary" action="#{loginAction.login()}" />
					</div>
				</div>
			</h:form>
		</div>
		
		<hr/>
		<footer>
		<p>(C) Company 2011</p>
		</footer>
	</ui:define>
</ui:composition>
